﻿#pragma once

#include "Basic.h"
#include "Coordinate.h"
#include "Calculus.h"
#include "Geodesy.h"
#include "LookupTable.h"
#include "Matrix.h"
#include "Polynomial.h"
#include "TransferFunction.h"
#include "Vector.h"

namespace ASL
{

// 飞行器类型
#define AIRCRAFT_F16 1

// 发动机类型
#define ENGINE_F100_PW_229 1

// 单位制常量
#define FT_TO_M 0.3048
#define IN_TO_M 0.0254
#define LBS_TO_KG 0.4536
#define LBF_TO_N 4.45
#define FT2_TO_M2 0.0929
#define SLUGFT2_TO_KGM2 1.3558
#define KT_TO_M 0.5144
#define BAR_TO_PA 100000.0
#define PSF_TO_PA 47.8803

    // 数学运算类
    class ASL_API MathOperation
    {
    public:
        // 相对位置坐标函数
        static ASL::Vector relativePosition(ASL::Vector &location, ASL::Vector &CG);

        // 重心偏移计算函数
        static ASL::Vector componentCG(double massRatio, ASL::Vector &location);

        // 附加转动惯量计算函数
        static ASL::Matrix componentInertia(double mass, ASL::Vector &location, ASL::Vector &CG);

        // 目标数值变化率函数
        static double seek(double current, double target, double decel, double accel);

        // 转子系数变化率函数
        static double spool(double N2, double BPR, double factor, double densityRatio);
    };

}
